﻿using ScFramework.Core;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public abstract class UISubmodule<T> : SubmoduleBase where T:UIBase
{
    protected T openedUI;
    public override void OnInit(object args)
    {
        base.OnInit(args);

        openedUI = GetSystemModule<UIManager>().Open(typeof(T).Name)as T;

    }
    public override void OnDestroy()
    {
        base.OnDestroy();
        GetSystemModule<UIManager>().Close(openedUI);
    }



}
